﻿<%@ Page Language="C#" MasterPageFile="~/admin/Admin.Master" AutoEventWireup="true" CodeBehind="Album.aspx.cs" Inherits="ESCHOOL.admin.WebForm12" Title="Untitled Page" %>
<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="server">
    <style type="text/css">

        .style3
        {
            width: 100%;
        }
        .style5
        {
            height: 28px;
        }
        .style6
        {
            height: 30px;
        }
        .style7
        {
            height: 9px;
        }
        .style8
        {
            width: 131px;
        }
        .style9
        {
            height: 9px;
            width: 131px;
        }
        .style10
        {
            height: 30px;
            width: 131px;
        }
        .style11
        {
            height: 28px;
            width: 131px;
        }
    </style>
    <title>Album</title>
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" runat="server">
    <p>
        <br />
    </p>
    <table style="width:100%">
        <tr>
            <td class="style8">
                &nbsp;</td>
            <td>
                <asp:TextBox ID="tbalbum_id" runat="server" Visible="False"></asp:TextBox>
            </td>
        </tr>
        <tr>
            <td class="style9">
                Album Name</td>
            <td class="style7">
                <asp:TextBox ID="tbalbumname" runat="server"></asp:TextBox>
                <asp:RequiredFieldValidator ID="RequiredFieldValidator1" runat="server" 
                    ControlToValidate="tbalbumname" ErrorMessage="fill it"></asp:RequiredFieldValidator>
            </td>
        </tr>
        <tr>
            <td class="style10">
                Front Picture</td>
            <td class="style6">
                <asp:FileUpload ID="fufront" runat="server" />
                <asp:TextBox ID="hiddenfront" runat="server" Visible="False"></asp:TextBox>
            </td>
        </tr>
        <tr>
            <td class="style11">
                <asp:Button ID="btninsert" runat="server" onclick="btninsert_Click" 
                    Text="Insert" />
            </td>
            <td class="style5">
                <asp:Button ID="btnupdate" runat="server" onclick="btnupdate_Click" 
                    Text="Update" />
            </td>
        </tr>
        <tr>
            <td class="style8">
                &nbsp;</td>
            <td>
                &nbsp;</td>
        </tr>
        <tr>
            <td colspan="2">
                <asp:GridView ID="GridView1" runat="server" AutoGenerateColumns="False" 
                    onrowdeleting="GridView1_RowDeleting" onrowediting="GridView1_RowEditing" 
                    onpageindexchanging="GridView1_PageIndexChanging">
                    <Columns>
                        <asp:BoundField DataField="album_name" HeaderText="Album Name" />
                        <asp:TemplateField HeaderText="Front Picture">
                            <ItemTemplate>
                                <asp:Image ID="Image1" runat="server" Height="41px" 
                                    ImageUrl='<%# "~/admin/front/"+Eval("front_picture") %>' Width="58px" />
                            </ItemTemplate>
                        </asp:TemplateField>
                        <asp:TemplateField HeaderText="Edit">
                            <ItemTemplate>
                                <asp:Button ID="btnedit" runat="server" 
                                    CommandArgument='<%# Eval("album_id") %>' CommandName="Edit" 
                                    oncommand="btnedit_Command1" Text="Edit" CausesValidation="False" />
                            </ItemTemplate>
                        </asp:TemplateField>
                        <asp:TemplateField HeaderText="Delete">
                            <ItemTemplate>
                                <asp:Button ID="btndelete" runat="server" 
                                    CommandArgument='<%# Eval("album_id") %>' CommandName="Delete" 
                                    oncommand="btndelete_Command" Text="Delete" CausesValidation="False" />
                            </ItemTemplate>
                        </asp:TemplateField>
                    </Columns>
                </asp:GridView>
                <br />
                <br />
                <br />
                <br />
                <br />
                <br />
            </td>
        </tr>
    </table>
</asp:Content>
